<?php
/**
 * Created by PhpStorm
 * USER MingTingLiang   QQ 915802070
 * Date 2020-12-18-018   9:53
 */


class NewsController extends BaseController
{
    public function index()
    {
        $newsDate = [
            ["title" => "测试标题01", "desc" => "ceshi  miaoshu01"],
            ["title" => "测试标题02", "desc" => "ceshi  miaoshu02"],
        ];
        $this->State->setState("news", "newslist", $newsDate);
        $this->State->setState("SiteName", "程序员在囧途");

        include "html/newsIndex.php";
    }
}

$news = new NewsController();
$news->index();